package com.youlai.boot.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youlai.boot.common.annotation.DataPermission;
import com.youlai.boot.system.model.entity.SpotTicket;
import com.youlai.boot.system.model.form.SpotTicketForm;
import com.youlai.boot.system.model.query.SpotTicketQuery;
import com.youlai.boot.system.model.vo.SpotTicketExcelVO;
import com.youlai.boot.system.model.vo.SpotTicketVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 预售票数据Mapper接口
 *
 * @author 李文兵
 * @since 2025-06-29 17:29
 */
@Mapper
public interface SpotTicketMapper extends BaseMapper<SpotTicket> {

    /**
     * 获取预售票数据分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return
     */
    @DataPermission(deptAlias = "st", userAlias = "st")
    Page<SpotTicketVO> getSpotTicketPage(Page<SpotTicketVO> page, SpotTicketQuery queryParams);

    /**
     *
     * @param id
     * @return
     */
    SpotTicketForm getSpotTicketFormData(@Param("id") Long id);

    /**
     *
     * @param queryParams
     * @return
     */
    @DataPermission(deptAlias = "st", userAlias = "st")
    List<SpotTicketExcelVO> exportList(@Param("queryParams") SpotTicketQuery queryParams);

    /**
     *
     * @param queryParams
     * @return
     */
    @DataPermission(deptAlias = "st", userAlias = "st")
    List<SpotTicketForm> getCount(@Param("queryParams")SpotTicketQuery queryParams);
}
